from django.db import models
from gis.common.django_ext.models import BaseModel
from itpay.core.mch.models import Account as MchAccount


class Bulletin(BaseModel):
    """
    公告
    """
    value = models.CharField(max_length=250)  # 公告内容
    start_time = models.DateTimeField()  # 公告开始时间
    end_time = models.DateTimeField()
    mchs = models.ManyToManyField(MchAccount)


class ExportTask(BaseModel):
    """
    导出任务
    """
    task_hash_code = models.CharField(max_length=64, unique=True)
    file_name = models.CharField(max_length=64)
    filter_conditions = models.CharField(max_length=1024, null=True)
    export_type = models.IntegerField()  # see ExportType
    remark = models.CharField(max_length=1024)
    status = models.IntegerField()
